<div
  id="assignment_{{id}}"
  class="ig-row {{#ifAll canManage published}}ig-published{{/ifAll}} {{#if is_master_course_master_content}}is-master{{/if}}"
  data-item-id="{{labelId}}"
>
  <div class="ig-row__layout">
    {{#if canManage}}
    <div aria-hidden='true' class="ig-handle">
      <span class="draggable-handle{{#unless canMove}} disabled{{/unless}}">
        <i class="icon-drag-handle"></i>
      </span>
    </div>
    {{/if}}
    <div class="ig-type-icon">
      <i aria-hidden="true" class='icon-{{iconType}}'></i>
    </div>
    <div class="ig-info">
      <a href="{{htmlUrl}}" class="ig-title">
        {{name}}
      </a>
      <div class="ig-details">
        {{#if canManage}}
          {{#if has_modules}}
            <div class="ig-details__item ig-details__item--wrap-text modules">
              {{#ifEqual module_count 1}}
                {{module_name}} {{#t}}Module{{/t}}
              {{else}}
                <a
                  title='{{joined_names}}'
                  class="tooltip_link"
                  data-tooltip-selector="#module_tooltip_{{labelId}}"
                >{{#t}}Multiple Modules{{/t}}</a>
              {{/ifEqual}}
              <div id="module_tooltip_{{labelId}}" style="display:none;">
                {{#each modules}}
                  <span>{{this}}</span>
                {{/each}}
              </div>
            </div>
          {{/if}}
        {{/if}}
        {{#if showAvailability}}
        <div class="ig-details__item assignment-date-available" data-view="date-available">
        </div>
        {{/if}}
        {{#if showDueDate}}
          <div class="ig-details__item assignment-date-due" data-view="date-due">
          </div>
        {{/if}}
        {{#if pointsPossible}}
          <div class="ig-details__item js-score">
            <span class="screenreader-only">
              {{#t}}{{n pointsPossible}} Points Possible{{/t}}
            </span>
            <span class="non-screenreader" aria-hidden="true">
              {{#t}}{{n pointsPossible}} pts{{/t}}
            </span>
          </div>
        {{else}}
          <span class="js-score screenreader-only">
            {{#t}}No Points Possible{{/t}}
          </span>
        {{/if}}
      </div>
    </div>
    {{#if canManage}}
      <div class="ig-admin">
        {{#if cyoe.isTrigger}}
        <a href="{{htmlEditUrl}}?return_to={{return_to}}#mastery-paths-editor" title="{{#t}}Edit Mastery Paths for {{name}}{{/t}}">{{#t}}Mastery Paths{{/t}}</a>
        {{/if}}
        {{#if cyoe.isReleased}}
        <span class="pill mastery-path-icon" aria-hidden="true" data-tooltip title="{{#t}}Released by Mastery Path: {{cyoe.releasedLabel}}{{/t}}">
          <i class="icon-mastery-path"></i>{{cyoe.releasedLabel}}
        </span>
        
        {{/if}}
        <span class="sis-button" data-view="sis-button"></span>
        <span class="lock-icon" data-view="lock-icon"></span>
        <span class="publish-icon" data-view="publish-icon"></span>
        <div class="inline-block">
          <a
            class="al-trigger al-trigger-gray"
            id="assign_{{id}}_manage_link"
            role="button"
            tabindex="0"
          >
            
            <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
          </a>

          <ul
            id="assignment_{{id}}_settings_list"
            class="al-options"
            role="menu"
          >
            <li>
              <a
                class="edit_assignment icon-edit"
                id="assignment_{{id}}_settings_edit_item"
                aria-label="{{#t}}Edit Assignment {{name}}{{/t}}"
                data-focus-returns-to="assign_{{id}}_manage_link"
              >{{#t}}Edit{{/t}}</a>
            </li>
            {{#if canDuplicate}}
            <li>
              <a
                class="duplicate_assignment icon-copy-course"
                id="assignment_{{id}}_settings_duplicate_item"
                aria-label="{{#t}}Duplicate Assignment {{name}}{{/t}}"
                data-focus-returns-to"assign_{{id}}_manage_link"
              >{{#t}}Duplicate{{/t}}</a>
            </li>
            {{/if}}
            {{#if canMove}}
            <li>
              <a
                class="move_assignment icon-updown"
                id="assignment_{{id}}_settings_move_item"
                aria-label='{{#t}}Move Assignment {{name}}{{/t}}'
                data-focus-returns-to="assign_{{id}}_manage_link"
              >{{#t}}Move To…{{/t}}</a>
            </li>
            {{else}}
            <li>
              <a
                class="move_assignment icon-updown disabled"
                id="assignment_{{id}}_settings_move_item"
                aria-label='{{#t}}Move Assignment {{name}}{{/t}}'
                aria-disabled=true
              >{{#t}}Move To…{{/t}}</a>
            </li>
            {{/if}}
            {{#if cyoe.isCyoeAble}}
            <li>
              <a
                href="{{htmlEditUrl}}?return_to={{return_to}}#mastery-paths-editor"
                class="edit_mastery_paths icon-mastery-path"
                id="assignment_{{id}}_settings_edit_item_mastery_paths"
                aria-label="{{#t}}Edit Assignment {{name}} Mastery Paths{{/t}}"
                data-focus-returns-to="assign_{{id}}_manage_link"
                title="{{#t}}Edit Mastery Paths for {{name}}{{/t}}"
              >{{#t}}Mastery Paths{{/t}}</a>
            </li>
            {{/if}}
            {{#unless is_locked}}
              <li>
                {{#if canDelete}}
                  <a
                    class="delete_assignment icon-trash"
                    id="assignment_{{id}}_settings_delete_item"
                    aria-label="{{#t}}Delete Assignment {{name}}{{/t}}"
                    data-focus-returns-to="assign_{{id}}_manage_link"
                  >{{#t "delete"}}Delete{{/t}}</a>
                {{else}}
                  <a
                    class="delete_assignment icon-trash disabled"
                    id="assignment_{{id}}_settings_delete_item"
                    aria-label="{{#t}}Delete Assignment {{name}}{{/t}}"
                    aria-disabled=true
                  >{{#t "delete"}}Delete{{/t}}</a>
                {{/if}}
              </li>
            {{/unless}}
            {{>ExternalTools/external_tools_menu menu_tools}}
          </ul>
        </div>
      </div>
    </div>

    <form data-view="edit-assignment" class="form-dialog"></form>
  {{/if}}
</div>
